package com.bwie.auth.remote;

import com.bwie.auth.remote.factory.RemoteSystemServiceFallbackFactory;
import com.bwie.common.pojo.res.LoginRes;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "zg5-system", fallbackFactory = RemoteSystemServiceFallbackFactory.class)
public interface RemoteSystemService {
    /**
     * 根据用户名查询用户信息
     * @param userName
     * @return
     */
    @GetMapping("/getUserByUserName/{userName}")
    Result<LoginRes> getUserByUserName(@PathVariable("userName") String userName);

    /**
     * 根据手机号查询用户信息
     * @param phone
     * @return
     */
    @GetMapping("/getUserByPhone/{phone}")
    Result<LoginRes> getUserByPhone(@PathVariable("phone") String phone);
}
